package com.atguigu.functions;

import com.atguigu.bean.WaterSensor;
import org.apache.flink.api.common.functions.MapFunction;

/**
 * @author gmd
 * @desc MapFunction接口实现类，自定义Map映射算子的业务逻辑。将WaterSensor类映射为String类
 * @since 2024-11-24 10:29:04
 */
public class MapFunctionImpl implements MapFunction<WaterSensor, String> {

    @Override
    public String map(WaterSensor value) throws Exception {
        return value.getId();
    }

}
